import Vue from 'vue'
import App from './App'
//引入路由
import VueRouter from 'vue-router';
//引入组件
import Goods from './components/goods/Goods.vue'
import Ratings from './components/ratings/Ratings.vue'
import Seller from './components/seller/Seller.vue'
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.use(VueAxios,axios);



Vue.config.productionTip = false
Vue.use(VueRouter)

const routes=[
  {path:"/",redirect:"/goods"},
  {path:"/goods",component:Goods},
  {path:"/ratings",component:Ratings},
  {path:"/seller",component:Seller},
  {path:"*",redirect:"/goods"}
]
const router = new VueRouter({
   mode: 'history',
   routes,
   linkActiveClass:"active"
  
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
